<?php
$errors = "<table class='phpError'>"
    . "<tr><th>Line</th><th>Error</th><th>File</th><th>Line</th></tr>";
$errorCount = 0;

function golondrinaErrors($number, $string, $file, $line) {
    global $errors;
    global $errorCount;
    $errorCount++;
    $errors .=  "<tr><td>" . $number . "</td>"
        . "<td>" . $string . "</td>"
        . "<td>" . $file . "</td>"
        . "<td>" . $line . "</td>"
        . "</tr>";
    return true;
}
if($errorCount > 0) {
    $errors .= "</table>";
    echo $errors;
}

set_error_handler('golondrinaErrors');

